﻿//using MT.Infrastructure.Models;
//using System;
//using System.Collections.Generic;
//using System.Security.Principal;
//using System.Text;

//namespace MT.MvcCore.Auth
//{
//    public class CustomPrincipal : ICustomPrincipal
//    {
//        public IIdentity Identity { get; private set; }
//        public CustomPrincipal(User user)
//        {
//            this.User = user;
//            this.Identity = new GenericIdentity(user.Id.ToString());
//        }


//        public CustomPrincipal(User user, Session session)
//        {
//            this.User = user;
//            this.Session = session;
//            this.Identity = new GenericIdentity(user.Id.ToString());
//        }


//        public User User { get; set; }
//        public Session Session { get; set; }

//        public bool IsInRole(string role)
//        {
//            return true;
//        }
//    }
//}
